#!/bin/bash

# 备份原有文件（如果存在）
if [ -f /etc/issue.net ]; then
    cp /etc/issue.net /etc/issue.net.bak
    echo "已备份原有 /etc/issue.net 文件"
fi

# 配置/etc/issue.net（远程登录横幅）
cat > /etc/issue.net <<'EOF'
Authorized uses only. All activity may be monitored and reported.
EOF

echo "远程登录警告横幅已配置完成"
